﻿using System;
interface IA
{
    double Area();
}
interface IB
{
    void SetColor(string c);
}

interface IC : IA, IB
{
    void Volume();
}
class Cylinder : IC
{
    public double Radius { get; set; }
    public double Height { get; set; }
    public string Color { get; set; }
    public Cylinder(double radius, double height)
    {
        Radius = radius;
        Height = height;
        Color = "默认颜色";
    }
    public double Area()
    {
        return Math.PI * Radius * Radius;
    }
    public void SetColor(string c)
    {
        Color = c;
    }
    public void Volume()
    {
        double volume = Area() * Height;
        Console.WriteLine($"圆柱体体积为：{volume}");
    }
}
class Program
{
    static void Main(string[] args)
    {
        Cylinder cylinder = new Cylinder(2, 5);
        double area = cylinder.Area();
        Console.WriteLine($"圆柱体底面积为：{area}");
        cylinder.SetColor("红色");
        Console.WriteLine($"圆柱体颜色为：{cylinder.Color}");
        cylinder.Volume();
    }
}